<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri ="http://java.sun.com/jsp/jstl/functions"%>
<div class="page-header">
	<h3>添加用户</h3>
</div>
<form role="form" id="form">
	<div class="form-group">
		<label for="url">url</label><input name="url" type="text"class="form-control" id="url" /> <br />
		<label for="limitTimes">访问限制数</label><input	name="limitTimes" type="number" class="form-control" id="limitTimes" /> <br />
		<label for="urlDesc">描述</label><textarea name="urlDesc" class="form-control" ></textarea> <br /> 
		<!-- rows="4" style="resize: none;" -->
	</div>
	<input id="submit" type="button" value="提交" class="btn btn-default" />
</form>
<script>
	var basePath = $("#basePath").val();

	
	$("#submit").click(function(){
		var params = $("#form").serializeArray();
		$.post(basePath+"/accessManager/doSave",params,function(qr){
			if(qr.result.success){
				layer.msg(qr.result.message, {icon : 1,time : 800}, function() {
					$("#rightDiv").load("${basePath}/accessManager/list");
				})
			}else{
				layer.msg(qr.result.message, {icon : 2,time : 800});
			}
		});
	})


</script>
